<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>中秋贺卡</title>
<link href="css/main.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<script type="text/javascript" charset="utf-8">
	String.prototype.trim= function(){  
    // 用正则表达式将前后空格  
    // 用空字符串替代。  
    	return this.replace(/(^\s*)|(\s*$)/g, "");  
	}

	function focusName(){
		var nameObj = document.generateForm.uname;
		if(nameObj.value=="输入姓名")
			nameObj.value = "";
	}

	function submitForm(){
		var nameValue = document.generateForm.uname.value.trim();
		var toastValue = document.generateForm.toast.value.trim();
		if(nameValue == ''||nameValue == "输入姓名"){
			alert('请输入名字!');
			document.generateForm.uname.focus();
			return;
		}
		if(toastValue == ''){
			alert('请写祝福语!');
			document.generateForm.toast.focus();
			return;
		}
		document.generateForm.submit();
	}
</script>
<body>
<form name="generateForm" action="card.jsp" method="get">
<div class="head">
  <div class="top">
    <div class="box01">
    值此佳节，<br/>您的朋友
      <label>
      <input type="text" name="uname" style="border:0;border-bottom:1px solid #ffffff; color:#cccccc; text-align:center; font-size:20px;black;background:transparent" onFocus="focusName()" value="输入姓名" size="6"/> 
      </label>
      祝您：<br/>
      <label>
      	<textarea rows="4" name="toast" style="border: 0; overflow: auto; margin-top:10px;text-decoration: underline;color:#cccccc; font-size:20px;background:transparent" >尽兴饮美酒， 满溢享财富！</textarea> 
      </label>
    </div>
    <div class="box02"><a href="javascript:submitForm()"><img src="images/icon02.png" width="150" height="50" border="0" /></a></div>
  </div>
</div>
</form>
<div class="foot">
  <div class="foot_right"><a href="http://smart-system.vicp.net:8088/xztz"><img src="images/icon06.png" border="0"/></a></div>
</div>
</body>
</html>
